import mock from '@/mock'
import data from './data/data'
export default {
  'post|/zzxt/api/getDyfzMembers': option => {
    const body = JSON.parse(option.body)
    const queryObject = body.params.queryObject
    const { page } = queryObject
    const classify = queryObject.classify
    const companyCode = queryObject.companyid
    if (companyCode === 'local') {
      switch (classify) {
        case 'fzdx': {
          const result1 = mock.splitPage(Object.assign({ list: data.db_fzdx }, page))
          return mock.toResult(result1)
        }
        case 'jjfz': {
          const result2 = mock.splitPage(Object.assign({ list: data.db_jjfz }, page))
          return mock.toResult(result2)
        }
        case 'ybdy': {
          const result3 = mock.splitPage(Object.assign({ list: data.db_ybdy }, page))
          return mock.toResult(result3)
        }
      }
    } else {
      switch (classify) {
        case 'fzdx': {
          const result1 = mock.splitPage(Object.assign({ list: data.db_fzdx_else }, page))
          return mock.toResult(result1)
        }
        case 'jjfz': {
          const result2 = mock.splitPage(Object.assign({ list: data.db_jjfz_else }, page))
          return mock.toResult(result2)
        }
        case 'ybdy': {
          const result3 = mock.splitPage(Object.assign({ list: data.db_ybdy_else }, page))
          return mock.toResult(result3)
        }
      }
    }
  }
}
